1 Kings
Also see 1 Kings Outline for the short version.
1 - Adonijah's secret coronation is spoiled by King Solomon's coronation
King David was so old, he could no longer get warm, so they chose a beautiful young woman, Abishag the Shunammite, to wait on him and lie in his arms. The king knew her not.
David never displeased Adonijah by asking about his actions, and he was the oldest after Absalom. Adonijah exalted himself with chariots and horsemen and 50 men to run before him. Joab and Abiathar followed Adonijah, but Zadok, Benaiah the son of Jehoiada, and Nathan the prophet and Shimei and Rei and David's mighty men were not with Adonijah. He invited all David's sons and royal officials of Judah but not Nathan, Benaiah, the mighty men, or Solomon when he sacrificed sheep, oxen, and fattened cattle by the Serpent's Stone beside En-rogel.
Nathan told Bathsheba that Adonijah became king without David's knowledge, so she should tell David and allow him to confirm her words before David, lest she and Solomon be counted offenders. They told David in succession, and David called for Bathsheba to swear again that Solomon shall reign. David called Zadok, Nathan, and Benaiah the son of Jehoiada to take the king's servants, have Solomon ride the king's mule to Gihon, have Zadok and Nathan anoint him, blow the trumpet to declare him king, and place Solomon on the throne. When they did, all the people went up after him, playing on pipes and rejoicing so that the earth was split by their noise.
Adonijah and his guests heard it as they finished feasting. Jonathan the son of Abiathar the priest suddenly arrived to inform them of Solomon's coronation and the king's servants' will for Solomon's name to be more famous and throne to be greater than David's. Adonijah's guests rose, trembling, and left. Adonijah feared Solomon, so he grabbed the horns of the altar. When King Solomon heard his plea for life, he said, "If he will show himself a worthy man, not one of his hairs shall fall to the earth, but if wickedness if found in him, he shall die." He brought his brother down from the altar and sent him to his house.
2 - David's parting instructions to Solomon
David commanded Solomon to keep the charge of the LORD his God, waking in his ways and keeping his statues, his commandments, his rules, and his testimonies, as written in the Law of Moses, that he may prosper in all he does, that the LORD may establish His word that David shall not lack a man on the throne of Israel.
He told him to act according to his own wisdom but to not let Joab go to Sheol in peace. Deal loyally with the sons of Barzillai the Gileadite and let them eat at the king's table. Though David swore not to kill Shimei the son of Gera, the Benjaminite, he told Solomon to not hold him guiltless but bring his gray head down with blood to Sheol.
David slept with his fathers and was buried in the city of David. He had reigned over Israel for 40 years, in Hebron for 7 years and 33 in Jerusalem. Solomon's kingdom was firmly established.
Adonijah the son of Haggith came to Bathsheba and said the kingdom was his in the eyes of Israel but taken from him because it was Solomon's in the eyes of the LORD. He only has one request: Abishag the Shunammite for a wife. Bathsheba carried his request to Solomon, and he asked her to ask for the kingdom also. He ordered for Adonijah to be put to death that day, sending Benaiah the son of Jehoiada to strike him down.
He then told Abiathar the priest to go to Anathoth instead of outright being put to death since he carried the ark of the Lord GOD before David and shared in his affliction. The word concerning the house of Eli in Shiloh was fulfilled.
Joab learned of the news and fled to the tent of the LORD and caught hold of the horns of the altar. Solomon heard and sent Benaiah the son of Jehoiada to strike him down. Benaiah went and told him the king ordered him to come out, but Joab insisted upon dying there. Benaiah told Solomon, and he said to do as Joab said, thus taking away from him and from his father's house the guilt for the blood that Joab shed without cause. He said, "So shall their blood come back on the head of Joab and on the head of his descendants forever. But for David and for his descendants and for his house and for his throne there shall be peace from the LORD forevermore." Benaiah struck Joab down and buried him in his own house in the wilderness.
Solomon put Benaiah over the army in Joab's place and Zadok the priest in Abiathar's place.
Solomon summoned Shimei and told him to build a house in Jerusalem and never leave. He will die the day he crosses the brook Kidron. Shimei agreed and obeyed until 3 years later when he pursued 2 of his servants who ran away to Achish, son of Maacah. When King Solomon heard, he confronted Shimei with his oath and told him, "You know in your own heart all the harm that you did to David my father. So the LORD will bright back your harm on your own head. But King Solomon shall be blessed, and the throne of David shall be established before the LORD forever." Solomon commanded Benaiah to strike Shimei down.